package com.zhangyu.shadow.repair.delegate.luncher;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zhangyu.shadow.repair.R;
import com.zhangyu.shadow.repair.delegate.bean.BusHistoryBean;

import java.util.List;


/**
 * @author zhangyu
 * @date 2018/10/12
 */

public class HistoryBusAdapter extends BaseQuickAdapter<BusHistoryBean, BaseViewHolder> {

    public HistoryBusAdapter(int layoutResId, List<BusHistoryBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BusHistoryBean item) {
        helper.setText(R.id.tv_bus_number, item.getVehicleCode());
        helper.setText(R.id.tv_bus_type, item.getType() == 0 ? "小修" : "保养");
       // helper.setText(R.id.tv_time, item.getReportTime());
        helper.addOnClickListener(R.id.tv_delete);
    }

}
